{{#ifdef description deprecated}}
/**
{{#if description}}
 * {{{escapeComment description}}}
{{/if}}
{{#if deprecated}}
 * @deprecated
{{/if}}
 */
{{/ifdef}}
export type {{{name}}} = {{>type parent=name}};
{{#if enums}}
{{#unless @root.useUnionTypes}}

export namespace {{{name}}} {

	{{#each enums}}
	{{#ifdef description deprecated}}
	/**
	{{#if description}}
	 * {{{escapeComment description}}}
	{{/if}}
	{{#if deprecated}}
	 * @deprecated
	{{/if}}
	 */
	{{/ifdef}}
	export enum {{{name}}} {
		{{#each enum}}
		{{{name}}} = {{{value}}},
		{{/each}}
	}

	{{/each}}

}
{{/unless}}
{{/if}}
